home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS064.dsk
/
REGULAR DEPOSITS II.bas
< prev
next >
Wrap
BASIC Source File
|
2012-02-16
|
901b
|
27 lines
10 PRINT "REGULAR DEPOSITS"
20 PRINT
29 REM - STATEMENTS 30 TO 100 REQUEST USER INPUT
30 PRINT "TOTAL VALUE AFFTER Y YEARS";
40 INPUT T
50 PRINT "NOMINAL INTEREST RATE";
60 INPUT I
70 PRINT "NUMBER OF DEPOSITS PER YEAR";
80 INPUT N
90 PRINT "NUMBER OF YEARS, MONTHS";
100 INPUT Y0,M
104 REM - CALCULATE YEARS FROM YEARS AND MONTHS
105 Y = (12 *Y0 +M)/12
108 REM - CALCULATE INTEREST RATE PER DEPOSIT;
109 REM - CONVERT FROM PERCENT TO DECIMAL
110 I = I/N/100
119 REM - CALCULATE AMOUNT OF REGULAR DEPOSIT BY FORMULA
120 R = T *I/((I +1) ^(N *Y) -1)
129 REM - ROUND OFF TO NEAREST CENT,PRINT
130 PRINT "REGULAR DEPOSITS = $"; INT(R *100 +.5)/100
139 REM - PRINT BLANK LINE TO SEPARATE DATA FROM QUESTION
140 PRINT
149 REM - RESTRT OR END PROGAM? USER INPUT REQUIRED
150 PRINT "MORE DATA? (1=YES, 0=NO)";
160 INPUT X
170 IF X = 1 THEN 20
180 PRINT "<CTRL-D>RUN HELLO"